#!/bin/sh

# Use neovim for vim if present.
#command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d"

# Verbosity and settings that you pretty much just always are going to want.
alias \
	cp="cp -iv" \
	mv="mv -iv" \
	rm="rm -v" \
	mkd="mkdir -pv" \
	ffmpeg="ffmpeg -hide_banner"

# Colorize commands when possible.
alias \
	ls="ls -hN --color=auto --group-directories-first" \
	grep="grep --color=auto" \
	diff="diff --color=auto" \
	ccat="highlight --out-format=ansi"

# These common commands are just too long! Abbreviate them.
alias \
	serve="python3 -m http.server 8000" \
	f="$FILE" \
	e="$EDITOR" \
	v="$EDITOR" \
	bat="cat /sys/class/power_supply/BAT?/capacity" \
	hl="uptime --pretty" \
	sdn="sudo shutdown -h now" \
	# sysp="sudo systemctl poweroff" \
	# sysr="sudo systemctl reboot" \
	# syss="sudo systemctl suspend" \

# This alias is important. It enables the `pauseallmpv` command.
alias mpv="mpv --input-ipc-server=/tmp/mpvsoc$(date +%s)"

# Some other stuff
alias \
	zathura="devour zathura" \
	mpv="devour mpv" \
	sxiv="devour sxiv" \
	usv="SVDIR=$HOME/.config/runit/service sv"
